package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PWDemo {
    public static void main(String[] args) throws IOException {
        PrintWriter pw=new PrintWriter("pw.txt");
        pw.println("和我在厕所的坑里拉一拉，");
        pw.println("直到所有的灯都熄灭了也拉不完");
        System.out.println("ok");
        pw.close();

        /*FileOutputStream fos =new FileOutputStream("pw.txt");
        OutputStreamWriter osw=new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        BufferedWriter bw=new BufferedWriter(osw);
        bw.write("和我在厕所的坑里拉一拉，");
        bw.write("直到所有的灯都熄灭了也拉不完");
        bw.close();*/
    }
}
